package com.witmore.neutron.ai.db.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * neutron用户apikey
 * </p>
 *
 * @author 豆子高
 * @since 2025-09-04
 */
@Accessors(chain = true)
@Getter
@Setter
@TableName("neutron_user_key")
public class UserKeyDO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 服务商ID
     */
    @TableField("provider_id")
    private Long providerId;

    /**
     * 员工ID
     */
    @TableField("user_id")
    private Long userId;

    /**
     * apikey名称
     */
    @TableField("key_name")
    private String keyName;

    /**
     * apikey
     */
    @TableField("api_key")
    private String apiKey;

    /**
     * 状态（0：未激活；1：已激活）
     */
    @TableField("active_status")
    private Integer activeStatus;

    /**
     * 更新时间
     */
    @TableField("update_time")
    private LocalDateTime updateTime;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;

    /**
     * 备注
     */
    @TableField("remark")
    private String remark;

    /**
     * 最近使用时间
     */
    @TableField("last_used_time")
    private LocalDateTime lastUsedTime;

}
